package com.candy.test;

import com.candy.dao.AccountDao;
import com.candy.service.AccountService;
import com.candy.service.impl.AccountServiceImpl;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Client {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        AccountService accountService=(AccountService)ac.getBean("AccountService");
        AccountService accountService2=(AccountService)ac.getBean("AccountService");
        System.out.println(accountService);
        accountService.saveAccount();
        System.out.println(accountService==accountService2);
        ac.close();






    }

}
